package com.woniuxy.enjoylife.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.enjoylife.entity.Server_order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.enjoylife.entity.dto.ReturnServerOrderDto;
import com.woniuxy.enjoylife.entity.dto.ServerAndOrderDto;
import com.woniuxy.enjoylife.entity.dto.SelectServerOrderDto;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author teamEnjoyLife75
 * @since 2021-01-19
 */
@Repository
@Mapper
public interface Server_orderMapper extends BaseMapper<Server_order> {

    List<ReturnServerOrderDto> selectDto(SelectServerOrderDto o);

    //查找单个
    Server_order selectSingle(Server_order o);

    //查找多个
    List<Server_order> select(Server_order o);

    //新增
    int insert(Server_order o);

    //修改
    int update(Server_order o);

    //删除
    int delete(Server_order o);
//    商家=========================================================================
//订单和服务dto
public ServerAndOrderDto serverAndOrderDtoMapper(String serial);

public List findServerAndOrder(Integer uid);

    //**********************用户服务订单管理
    //用户取消订单
    int cancleOrder(int id);
    //用户删除订单
    int deleteOrder(int id);

}
